package com.candoit.webapps.pricing.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "tipo_linea")
public class TipoLinea implements Serializable {
	
	private static final long serialVersionUID = -7795305014311110196L;
	public static final Integer INDUSTRIAL = 1;
	public static final Integer ARTESANAL = 2;
	public static final Integer SEMIARTESANAL = 3;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id")
	private Integer id;
	
	@Column(name = "descripcion")
	private String descripcion;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescripcion() {
		return descripcion;
	}

	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof TipoLinea && ((TipoLinea)obj).getId().equals(this.id)){
			return true;
		}
		return false;
	}
	
	@Override
	public String toString(){
		return this.descripcion;
	}
	

}
